<?php

/**
 * 文件注释
 *
 * Author: Pota
 * Datetime: 8/31/17 11:30 PM
 */

namespace ApiBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

class LogController extends  ApiController
{
    public function testAction(Request $request)
    {
        $logger = $this->get('logger');
        $logger->emergency("系统挂掉了");
        $logger->alert("数据库访问异常");
        $logger->critical("系统出现未知错误");
        $logger->error("指定变量不存在");
        $logger->warning("该方法已经被废弃");
        $logger->notice("用户在异地登录");
        $logger->info("用户xxx登录成功",array('user_id'=>1));

//        $logger->debug("调试信息");
        return new Response('123');
    }
}